//
//  HomeViewController.swift
//  DMTabBar
//
//  Created by Apple on 2017/2/13.
//  Copyright © 2017年 AF. All rights reserved.
//

import UIKit

class HomeViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = .cyan
        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    @IBAction func showVC2() {
        self.performSegue(withIdentifier: "showVC2", sender: self)
    }
    @IBAction func showVC3() {
        self.performSegue(withIdentifier: "showVC3", sender: self)
    }
    
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        
        if segue.identifier == "showVC2" {
            let tmpVC = segue.destination as! GameViewController
            tmpVC.setValue("您好？", forKey: "Title")
        }
        else if segue.identifier == "showVC3" {
            let tmpVC = segue.destination as! HistoryViewController
            tmpVC.title = "大家好？"
        }
    }
    
    
    
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
